package world.ztomorrow.search.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import world.ztomorrow.search.dao.po.BookInfo;

import java.util.List;

@FeignClient("yc-novel")
@Component
public interface NovelClient {

    @GetMapping("/search/books")
    List<BookInfo>  listAllBook();

    @GetMapping("/search/book")
    BookInfo getBookById(@RequestParam("id") Long id);
}
